//
//  SquashEnum.m
//  SquashSpark
//
//  Created by Coollang on 2017/11/18.
//  Copyright © 2017年 Coollang-YF. All rights reserved.
//

#import "SquashEnum.h"

@implementation SquashEnum
+ (NSString *)stringWithGender:(Gender)gender {
    switch (gender) {
        case GenderMale:
            return @"Male";
        case GenderFemale:
            return @"Female";
        case GenderUnknown:
            return @"";
        default:
            break;
    }
}
+ (NSString *)stringWithTimeSectionType:(TrainingTimeSectionType)sectionType {
    switch (sectionType) {
        case TrainingTimeSectionDay:
            return @"per Day";
        case TrainingTimeSectionWeek:
            return @"per Week";
        case TrainingTimeSectionMonth:
            return @"per Month";
        default:
            return @"per Day";
            break;
    }
    
}
+ (TrainingTimeSectionType)timeSectionWithString:(NSString *)string {
    NSString *str = [string localizedLowercaseString];
    if ([str containsString:@"day"]) {
        return TrainingTimeSectionDay;
    }else if ([str containsString:@"week"]){
        return TrainingTimeSectionWeek;
    }else if ([str containsString:@"month"]){
        return TrainingTimeSectionMonth;
    }
    return TrainingTimeSectionDay;
}

+ (NSString *)stringWithSpotterType:(SpotterTopicType)type {
    switch (type) {
        case kSpotterTopicVulgar:
            return @"Vulgar";
        case kSpotterTopicViolentAndPornographic:
            return @"Violent And Pornographic";
        case kSpotterTopicPersonalAttack:
            return @"Personal Attack";
        case kSpotterTopicAdvertisement:
            return @"Advertisement";
        case kSpotterTopicLawsAndRules:
            return @"Laws And Rules";
    }
}

+ (NSString *)pidStringWithOemType:(OemType)oemType {
    switch (oemType) {
        case OemTypeSquash:
            return @"S0";
        default:
            return @"";
    }
}

+ (NSString *)stringWithRacquet:(RacquetType)racquetType {
    switch (racquetType) {
        case RacquetVeryLight:
            return @"110 grams -130 grams";
        case RacquetLight:
            return @"140 grams -150 grams";
        case RacquetOrdinary:
            return @"160 grams -170 grams";
        case RacquetHeavy:
            return @"180 grams or more";
        default:
            return @"";
    }
}


+ (NSString *)stringWithSportActionType:(kSportActionType)actionType {
    switch (actionType) {
        case kSportActionDrop:
            return @"Drop";
        case kSportActionLop:
            return @"Lop";
        case kSportActionLength:
            return @"Length";
        case kSportActionBoast:
            return @"Boast";
        case kSportActionOther:
            return @"Other";
    }
}

@end
